<script setup lang="ts">
import { ref } from 'vue'

const count = ref(0)

const increment = () => {
  count.value++
}
</script>

<template>
  <div>
    <h1>Ref 用法示例</h1>
    <p>计数: {{ count }}</p>
    <button @click="increment">点击 +1</button>
    <p>说明: ref(0) 创建响应式数据，count.value++ 更新时视图自动刷新</p>
  </div>
</template>

